The present invention relates to a virtual data storage system, and more particularly to a distributed, table-driven virtual storage system having mapping table entries representing virtual storage segments of differing sizes.
In a table driven, virtual storage network, a table maps virtual disk segments to physical storage containers. A key issue in forming the virtual networking is the selection of method used to map the virtual storage to the actual storage.
A virtual storage network can map fixed-sized segments of contiguous blocks in each mapping table entry. For mapping efficiency, these segments need to be fairly large, on the order of one megabyte of virtual disk data. One problem with large segments is the time needed to copy large blocks of the underlying non-virtual storage during operations such as the copying or migration of data. During such data movement operations, virtual disk I/O operations to those segments being copied must be stalled until the data movement is finished. This would typically be accomplished by setting a state in the entry to prevent I/O operations to the affected segment. The host write operation cannot be released until the data movement has completed. For large segments, this can add unacceptably long latencies to the virtual disk I/O operation. This delay adversely effects the performance of the storage system by adding undesirably large latencies to virtual disk I/O operations.
The problem of undesirably large latencies during data movement operations can be solved by using smaller segments, but this increases the costs associated with mapping, such as the overhead of storing and managing a much larger number of map entries. This also potentially reduces the amount of contiguous data on the non-virtual storage.
An ideal virtual storage system therefore having a mapping system that achieves the benefits for both large and small segment mapping. In particular, an ideal mapping system would achieve the low administrative cost of larger segmentation and the reduced latencies of smaller segmentation
In response to these and other needs, the present invention provides a method and system comprising a combination of segment sizes, namely a large segment for the normal case, while breaking the large segment into single disk blocks during data movement. In this way, the administration costs are generally low, but latencies caused by the movement of large data blocks are avoided. The mapping is implemented through distributed mapping agents that may write to the alternative location while the large segment is being moved.